import cv2


class BaseFunc:
    def __init__(self):
        self.start = 1

    def gaussian_blur(self, img, level):
        return cv2.GaussianBlur(img, (5, 5), level)

    def equalize(self, img):
        ycrcb = cv2.cvtColor(img, cv2.COLOR_BGR2YCrCb)
        channels = cv2.split(ycrcb)
        cv2.equalizeHist(channels[0], channels[0])
        cv2.merge(channels, ycrcb)
        result = cv2.cvtColor(ycrcb, cv2.COLOR_YCrCb2BGR)
        return result

    def show_window(self, name, image):
        cv2.imshow(name, image)
